﻿/****************************************************************
 * Copyright (c) 2010-2013 Besture All Rights Reserved.
 * 
 * File Name:		AdminService 
 * 
 * Created:		2013-8-16 10:35:39
 * Original Author:	nitao 
 * 
 * ------------------------------------------------------------
 * MODIFICATION HISTORY
 * ------------------------------------------------------------
 * When			Who		Why
 * ------------------------------------------------------------
 * 
 *
 ****************************************************************/

using System;
using System.Collections.Generic;
using System.Text;
using Besture.Common.Definition;


namespace Besture.Bll
{
    public class AdminService
    {
        /// <summary>
        /// 后台登录页面
        /// </summary>
        public static string ADMIN_LOGIN ="/Admin/Login.aspx";
        /// <summary>
        /// 后台首页
        /// </summary>
        public static string ADMIN_INDEX = "/Admin/Main.aspx";
        /// <summary>
        /// 修改密码
        /// </summary>
        public static string UPDATE_PASSWORD = "/Admin/UpdatePassword.aspx";
        /// <summary>
        /// 退出
        /// </summary>
        public static string OUT = AppSettings.GetMainDomain() + "/Admin/Out.aspx";

        /// <summary>
        /// 后台登录页面
        /// </summary>
        /// <returns></returns>
        public static string  LoginUrl()
        {
            //当前地址
            string curLocalPath = System.Web.HttpContext.Current.Request.Url.LocalPath;
            string loginUrl = string.Format(@"{0}?returnUrl={1}", ADMIN_LOGIN, curLocalPath);
            return loginUrl;
        }

        /// <summary>
        /// 添加日志
        /// </summary>
        /// <param name="logContent">日志内容</param>
        /// <param name="modules">模块</param>
        public static void AddLog(string logContent,string modules)
        {
            LogDac logDac = new LogDac();
            logDac.Add(logContent, modules);
        }
    }

}
